<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Title</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      html {
        padding: 50px;
        background: #eee;
      }
      img {
        width: 300px;
        margin: 20px;
        border: 1px dashed #ccc;
        box-sizing: border-box;
        vertical-align: middle;
      }
      .before {
        float: left;
        clear: both;
      }
      .after {
        float: left;
      }
    </style>
  </head>
  <body>
    <div id="main"></div>

    <template id="template">
      <div class="sample">
        <div class="before">处理前：<img src="{{before}}" /></div>
        <div class="after">处理后：<img src="{{after}}" /></div>
      </div>
    </template>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script src="./index.js"></script>
  </body>
</html>
